<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<%@ include file="header.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link type="text/css" rel="stylesheet" href="css/style.css" />
    <!--[if IE 6]>
    <script src="js/iepng.js" type="text/javascript"></script>
        <script type="text/javascript">
           EvPNG.fix('div, ul, img, li, input, a'); 
        </script>
    <![endif]-->
    
    <script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="js/menu.js"></script>    
            
	<script type="text/javascript" src="js/lrscroll_1.js"></script>
    <script type="text/javascript" src="js/cart/cart.js"></script>
    
	<script type="text/javascript" src="js/n_nav.js"></script>
    <script type="text/javascript" src="js/jquery-1.12.4.min.js"></script>
<title>按分类查询商品</title>
</head>
<body>  
<!--Begin Header Begin-->
<div id="searchBar">
    <%@ include file="searchBar.jsp" %>
</div>
<!--End Header End--> 
<!--Begin Menu Begin-->
<div class="menu_bg">
		<div class="menu">
			<!--Begin 商品分类详情 Begin-->
			<div class="nav">
				<div class="nav_t">全部商品分类</div>
				<div class="leftNav">
					<ul>
						<c:forEach items="${requestScope.listProductCategory}"
							var="category">
							<c:if test="${category.type == 1 }">
								<li>
									<div class="fj">
										<span class="n_img"><span></span><img
											src="images/nav1.png" /></span> 
											<span class="fl"><a href="ProductServlet?action=queryList&categoryId=${category.id }&categoryLeve1=${category.type }&currPage=1">${category.name }</a></span>
									</div>
									<div class="zj">
										<div class="zj_l">
											<c:forEach items="${requestScope.listProductCategory}"
												var="category2">
												<c:if
													test="${category2.type == 2 and category2.parentId == category.id}">
													<div class="zj_l_c">
														<h2><a href="ProductServlet?action=queryList&categoryId=${category2.id }&categoryLeve1=${category2.type}&currPage=1">${category2.name}</a></h2>
														<c:forEach items="${requestScope.listProductCategory}"
															var="category3">
															<c:if
																test="${category3.type == 3 and category3.parentId == category2.id}">
																<a href="ProductServlet?action=queryList&categoryId=${category3.id }&categoryLeve1=${category3.type}&currPage=1">${category3.name }</a>|
													        </c:if>
														</c:forEach>
													</div>
												</c:if>
											</c:forEach>
										</div>
										<div class="zj_r">
											<a href="CategoryList.html"><img src="images/n_img1.jpg"
												width="236" height="200" /></a> <a href="CategoryList.html"><img
												src="images/n_img2.jpg" width="236" height="200" /></a>
										</div>
									</div>
								</li>
							</c:if>
						</c:forEach>
					</ul>
				</div>
			</div>
			<!--End 商品分类详情 End-->
			<ul class="menu_r">
				<li><a href="Index.html">首页</a></li>
				<c:forEach items="${requestScope.listProductCategory}"
					var="category">
					<c:if test="${category.type == 1 }">
						<li><a href="ProductServlet?action=queryList&categoryId=${category.id }&categoryLeve1=${category.type}&currPage=1">${category.name }</a></li>
					</c:if>
				</c:forEach>
			</ul>
			<div class="m_ad">中秋送好礼！</div>
		</div>
	</div>
	<!--End Menu End-->
     
        <div class="l_list">
        	<div class="list_t">
            	<span class="fl list_or">
                	<a href="#" class="now">默认</a>
                    <a href="#">
                    	<span class="fl">销量</span>                        
                        <span class="i_up">销量从低到高显示</span>
                        <span class="i_down">销量从高到低显示</span>                                                     
                    </a>
                    <a href="#">
                    	<span class="fl">价格</span>                        
                        <span class="i_up">价格从低到高显示</span>
                        <span class="i_down">价格从高到低显示</span>     
                    </a>
                    <a href="#">新品</a>
                </span>
                <span class="fr">共发现${requestScope.pageUtil.totalCount }件</span>
            </div>
            <div class="list_c">
               <ul class="cate_list">
                	<c:forEach items="${requestScope.pageUtil.list }" var="product">
                	<li>
                    	<div class="img"><a href="ProductServlet?action=queryDetails&id=${product.id }"><img src="images/per_1.jpg" width="210" height="185" onclick="ain()"/></a></div>
                        <div class="price">
                            <font>￥<span>${product.price }</span></font> &nbsp; 26R
                        </div>
                        <div class="name"><a href="Product.html">${product.name }</a></div>
                        <div class="carbg">
                        	<a href="#" class="ss">收藏</a>
                            <a href="#" class="j_car" onclick="addCartByParam(${product.id},1);">加入购物车</a>
                        </div>
                    </li>
                    </c:forEach>
                </ul>           
                 <!-- 分页条 begin-->
                <div class="pages">
				    <c:if test="${pageUtil.totalPage>=1}">
				      <c:set var="url" value="ProductServlet?action=queryList&categoryId=${param.categoryId}&categoryLeve1=${param.categoryLeve1}"></c:set>
				      <a href="${url }&currPage=1" class="p_pre">首页</a>
				        <c:if test="${pageUtil.currPage>1}">
				            <a href="${url}&currPage=${pageUtil.currPage-1}" class="p_pre">上一页</a>
				        </c:if>
				        <c:forEach  var="temp" begin="${pageUtil.currPage>3?pageUtil.currPage-3:1}" end="${pageUtil.totalPage-pageUtil.currPage>3?pageUtil.currPage+3:pageUtil.totalPage}" step="1">
				            <c:if test="${pageUtil.currPage==temp}">
				                <a href="${url}&currPage=${temp}" class="cur">${temp}</a>
				            </c:if>
				            <c:if test="${pageUtil.currPage!=temp}">
				                <a href="${url}&currPage=${temp}">${temp}</a>
				            </c:if>
				        </c:forEach>
				      <c:if test="${pageUtil.currPage<pageUtil.totalPage}">
				         <a href="${url}&currPage=${pageUtil.currPage+1}" class="p_pre">下一页</a>
				      </c:if>
				      <a href="${url}&currPage=${pageUtil.totalPage}" class="p_pre">尾页</a>
				    </c:if>
				    <c:if test="${pageUtil.totalPage==0}">
				        暂无记录
				    </c:if>
				</div>
				 <!-- 分页条 end-->
            </div>
        </div>
    </div>
    
    <!--Begin Footer Begin -->
    <div class="b_btm_bg bg_color">
        <div class="b_btm">
            <table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;" cellspacing="0" cellpadding="0">
              <tr>
                <td width="72"><img src="images/b1.png" width="62" height="62" /></td>
                <td><h2>正品保障</h2>正品行货  放心购买</td>
              </tr>
            </table>
			<table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;" cellspacing="0" cellpadding="0">
              <tr>
                <td width="72"><img src="images/b2.png" width="62" height="62" /></td>
                <td><h2>满38包邮</h2>满38包邮 免运费</td>
              </tr>
            </table>
            <table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;" cellspacing="0" cellpadding="0">
              <tr>
                <td width="72"><img src="images/b3.png" width="62" height="62" /></td>
                <td><h2>天天低价</h2>天天低价 畅选无忧</td>
              </tr>
            </table>
            <table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;" cellspacing="0" cellpadding="0">
              <tr>
                <td width="72"><img src="images/b4.png" width="62" height="62" /></td>
                <td><h2>准时送达</h2>收货时间由你做主</td>
              </tr>
            </table>
        </div>
    </div>
    <div class="b_nav">
    	<dl>                                                                                            
        	<dt><a href="#">新手上路</a></dt>
            <dd><a href="#">售后流程</a></dd>
            <dd><a href="#">购物流程</a></dd>
            <dd><a href="#">订购方式</a></dd>
            <dd><a href="#">隐私声明</a></dd>
            <dd><a href="#">推荐分享说明</a></dd>
        </dl>
        <dl>
        	<dt><a href="#">配送与支付</a></dt>
            <dd><a href="#">货到付款区域</a></dd>
            <dd><a href="#">配送支付查询</a></dd>
            <dd><a href="#">支付方式说明</a></dd>
        </dl>
        <dl>
        	<dt><a href="#">会员中心</a></dt>
            <dd><a href="#">资金管理</a></dd>
            <dd><a href="#">我的收藏</a></dd>
            <dd><a href="#">我的订单</a></dd>
        </dl>
        <dl>
        	<dt><a href="#">服务保证</a></dt>
            <dd><a href="#">退换货原则</a></dd>
            <dd><a href="#">售后服务保证</a></dd>
            <dd><a href="#">产品质量保证</a></dd>
        </dl>
        <dl>
        	<dt><a href="#">联系我们</a></dt>
            <dd><a href="#">网站故障报告</a></dd>
            <dd><a href="#">购物咨询</a></dd>
            <dd><a href="#">投诉与建议</a></dd>
        </dl>
        <div class="b_tel_bg">
        	<a href="#" class="b_sh1">新浪微博</a>            
        	<a href="#" class="b_sh2">腾讯微博</a>
            <p>
            服务热线：<br />
            <span>400-123-4567</span>
            </p>
        </div>
        <div class="b_er">
            <div class="b_er_c"><img src="images/er.gif" width="118" height="118" /></div>
            <img src="images/ss.png" />
        </div>
    </div>    
    <div class="btmbg">
		<div class="btm">
        	备案/许可证编号：蜀ICP备12009302号-1-www.dingguagua.com   Copyright © 2015-2018 尤洪商城网 All Rights Reserved. 复制必究 , Technical Support: Dgg Group <br />
            <img src="images/b_1.gif" width="98" height="33" /><img src="images/b_2.gif" width="98" height="33" /><img src="images/b_3.gif" width="98" height="33" /><img src="images/b_4.gif" width="98" height="33" /><img src="images/b_5.gif" width="98" height="33" /><img src="images/b_6.gif" width="98" height="33" />
        </div>    	
    </div>
    <!--End Footer End -->    
</div>

</body>


<!--[if IE 6]>
<script src="//letskillie6.googlecode.com/svn/trunk/2/zh_CN.js"></script>
<![endif]-->
</html>
